package com.demo.mvc.ioc;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@Primary
@ConditionalOnProperty(name="mouse", havingValue = "true")
public class MouseImpl implements Animal {
  @Override
  public void say() {
    log.info("Mouse say, hell world.");
  }
}
